package router

import (
	"github.com/gin-gonic/gin"
	"zg5/videos/api-gateway/internal/handler"
)

func LoadRouter(r *gin.Engine) {

	apiRouter := r.Group("/api")
	{
		userRouter := apiRouter.Group("/user")
		{
			userRouter.GET("/info", handler.UserInfo)
		}
		videoRouter := apiRouter.Group("/video")
		{
			videoRouter.POST("/add", handler.AddVideo)
			videoRouter.GET("/list", handler.VideoList)
		}
	}
}
